package Hw_05;

public class Volume extends Rectangle{
    private double high;

    public Volume() {
    }

    public Volume(double length, double wide, double high) {
        super(length, wide);
        this.high = high;
    }

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }
    public void volume(){
        System.out.println("长方体的体积为："+this.getLength()+"*"+this.getWide()+"*"+this.getHigh()+"="+(this.getLength()*this.getWide()*this.getHigh()));
    }
}
